import request from './request'

export const getNoticeData = () => {
  return request({
    url: '/notice/getdata',
    method: 'GET',
    headers: {
      token: localStorage.getItem('token') || ''
    }
  })
}
export const getNotice = (page, limit, data) => {
  // console.log(data)
  return request({
    url: `/notice/paging/${page}/${limit}`,
    method: 'POST',
    headers: {
      token: localStorage.getItem('token') || ''
    },
    data
  })
}

export const addNotice = (data) => {
  return request({
    url: '/notice/add',
    method: 'POST',
    data
  })
}
export const deleteNotice = (noticeid) => {
  return request({
    url: `/notice/delete/${noticeid}`,
    method: 'DELETE'
  })
}
